<%@page import="java.util.*"%>
<%@page import="java.text.*"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %> 
<%
    String path = request.getContextPath(); 
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+path+ "/"; 
     
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
    <head>
    <style type="text/css">
    a{ text-decoration:none} 
    </style>
        <meta charset="utf-8">
        <base href="<%=basePath%>">
        <title>
                            提现详情
        </title>
        <meta name="renderer" content="webkit">
        <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
        <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
        <meta name="apple-mobile-web-app-status-bar-style" content="black">
        <meta name="apple-mobile-web-app-capable" content="yes">
        <meta name="format-detection" content="telephone=no">
        <link rel="stylesheet" href="css/x-admin.css" media="all">
    </head>
    
    <body>
       <fieldset class="layui-elem-field">
				  <legend>提现信息</legend>
				  <div class="layui-field-box">
				      <form class="layui-form layui-form-pane" action="">
				          <input type="hidden" id="gId" value="${withdraw.gId}">
						  <div class="layui-form-item">
						    <label class="layui-form-label">昵称</label>
						    <div class="layui-input-inline">
						      <input type="text" name="username" lay-verify="required" autocomplete="off" class="layui-input" disabled="disabled" value="${withdraw.uName}">
						    </div>
						  </div>
						  <div class="layui-form-item">
						    <label class="layui-form-label">手机号</label>
						    <div class="layui-input-inline">
						      <input type="text" name="username" lay-verify="required" autocomplete="off" class="layui-input" disabled="disabled" value="${withdraw.phone}">
						    </div>
						  </div>

						  <div class="layui-form-item">
						    <label class="layui-form-label">账户名称</label>
						    <div class="layui-input-inline">
						      <input type="text" name="username" lay-verify="required" autocomplete="off" class="layui-input" disabled="disabled" value="${withdraw.gAccountName}">
						    </div>
						  </div>
						  
						  <div class="layui-form-item">
						    <label class="layui-form-label">提现金额</label>
						    <div class="layui-input-inline">
						      <input type="text" name="username" lay-verify="required" autocomplete="off" class="layui-input" disabled="disabled" value="${withdraw.gMoney}">
						    </div>
						  </div>
						  
						  <div class="layui-form-item">
						    <label class="layui-form-label">提现银行</label>
						    <div class="layui-input-inline">
						      <input type="text" name="username" lay-verify="required" autocomplete="off" class="layui-input" disabled="disabled" value="${withdraw.gBankName}">
						    </div>
						  </div>
						  
						  <div class="layui-form-item">
						    <label class="layui-form-label">提现卡号</label>
						    <div class="layui-input-inline">
						      <input type="text" name="username" lay-verify="required" autocomplete="off" class="layui-input" disabled="disabled" value="${withdraw.gAccountBank}">
						    </div>
						  </div>
						  
						   <div class="layui-form-item">
						    <label class="layui-form-label">提交时间</label>
						    <div class="layui-input-inline">
						      <input type="text" name="username" lay-verify="required" autocomplete="off" class="layui-input" disabled="disabled" value='<fmt:formatDate value="${withdraw.gCreateTime}"/>'>
						    </div>
						  </div>
						  
						  <c:if test="${withdraw.gStatus==2 || withdraw.gStatus==3}">
							  <div class="layui-form-item">
							    <label class="layui-form-label">审核时间</label>
							    <div class="layui-input-inline">
							      <input type="text" name="username" lay-verify="required" autocomplete="off" class="layui-input" disabled="disabled" value='<fmt:formatDate value="${withdraw.gCreateTime}"/>'>
							    </div>
							  </div>
						  </c:if>
						  
						  <c:if test="${withdraw.gStatus==5}">
							  <div class="layui-form-item">
							    <label class="layui-form-label">到账时间</label>
							    <div class="layui-input-inline">
							      <input type="text" name="username" lay-verify="required" autocomplete="off" class="layui-input" disabled="disabled" value='<fmt:formatDate value="${withdraw.gAccountTime}"/>'>
							    </div>
							  </div>
						  </c:if>
						  
						  <div class="layui-form-item">
						    <label class="layui-form-label">提现状态</label>
						    <div class="layui-input-inline">
						      <c:if test="${withdraw.gStatus==1}">
						          <input type="text" name="username" lay-verify="required" autocomplete="off" class="layui-input" disabled="disabled" value="待审核">
						      </c:if>
						      <c:if test="${withdraw.gStatus==2}">
						          <input type="text" name="username" lay-verify="required" autocomplete="off" class="layui-input" disabled="disabled" value="审核通过">
						      </c:if>
						      <c:if test="${withdraw.gStatus==3}">
						          <input type="text" name="username" lay-verify="required" autocomplete="off" class="layui-input" disabled="disabled" value="审核不通过">
						      </c:if>
						      <c:if test="${withdraw.gStatus==4}">
						          <input type="text" name="username" lay-verify="required" autocomplete="off" class="layui-input" disabled="disabled" value="审核通过，提现失败">
						      </c:if>
						      <c:if test="${withdraw.gStatus==5}">
						          <input type="text" name="username" lay-verify="required" autocomplete="off" class="layui-input" disabled="disabled" value="提现到账">
						      </c:if>
						    </div>
						  </div>
                  </form>
				  </div>
				  
				  
		      <div class="layui-form-item">
		            <label for="L_repass" class="layui-form-label">
		            </label>
		             <button  class="layui-btn" onclick="parent.location.reload()">
		                                                                   关闭
		            </button>
		             <c:if test="${withdraw.gStatus==1}">
					      <button type="submit" onclick="update(2)" class="layui-btn">审核通过</button>
						  <button type="submit" onclick="update(3)" class="layui-btn">审核不通过</button> 
					 </c:if>
		             
		              <c:if test="${withdraw.gStatus==2}">
					      <button type="submit" onclick="update(5)" class="layui-btn">提现到账</button>
						  <button type="submit" onclick="update(4)" class="layui-btn">提现失败</button> 
					  </c:if>
		       </div>
      </fieldset>
        <script src="js/jquery-3.2.1.min.js"></script>
        <script src="lib/layui/layui.js" charset="utf-8">
        </script>
        <script src="js/x-layui.js" charset="utf-8">
      
        </script>
        <script>
            layui.use(['form','layer'], function(){
                $ = layui.jquery;
              var form = layui.form()
              ,layer = layui.layer;
 
            });
            
        </script>
        <script>
        var _hmt = _hmt || [];
        (function() {
          var hm = document.createElement("script");
          hm.src = "https://hm.baidu.com/hm.js?b393d153aeb26b46e9431fabaf0f6190";
          var s = document.getElementsByTagName("script")[0]; 
          s.parentNode.insertBefore(hm, s);
        })();
        
        
        function update(status) {
        	var id = $("#gId").val();
    		layer.confirm('确认要进行该操作吗？',function(index){
               $.ajax({
    		    type:"get",
    			url:"content/updateStatus",
    			data:{"gId":id,"status":status
    				},
    			success:function(data){
    				 //console.log(data)
    			 	if(data.code==200){
    			 		layer.msg('操作成功!',{icon:1,time:4000});	
    			 		location.reload();
    		 		}else{
    		 			layer.msg('操作失败!',{icon:1,time:3000});			
    		 		}
    			} 
      		 });
            });
    	}
        </script>
    </body>


</html>